package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;

//xlx第二次尝试
import com.example.myapplication.ui.login.LoginActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_loading); // 显示loading界面
        Handler handler = new Handler();
        handler.postDelayed(new SplashHandler(), 2000); // 延迟3秒，再转到longinActivity

    }
    class SplashHandler implements Runnable

    {
        public void run()

        {
            startActivity(new Intent(getApplication(), LoginActivity.class)); // 显示loginActivity
            MainActivity.this.finish();   // 结束loadingActivity
        }
    }

}